package com.hundun.hddeal.service;


import com.github.pagehelper.PageInfo;
import com.hundun.hddeal.entity.Gzh;
import com.hundun.hddeal.entity.GzhBody;
import com.hundun.hddeal.entity.GzhCount;
import com.hundun.hddeal.response.Result;
import com.hundun.hddeal.vo.GzhVo;
import org.apache.ibatis.annotations.Param;

import java.io.IOException;
import java.util.List;

public interface GzhService {

    /** 通过类别Id查询gzh */
    PageInfo<Gzh> selectByMtIdAndState(Integer page,Integer size,Long mtId);

   /** 通过用户Id查询 */
   PageInfo<GzhBody> selectByMtId(Integer page,Integer size,String mtId,Byte status,String gzhName,Double gzhSex,List typeName,String cityOne,Integer gzhType,Double readOne,Double readTwo,
                                  Integer fans,Double scoreOne,Double scoreTwo,String ghId,String admin,Integer failureCookie) throws IOException;

   List <Gzh> selectMtId (Long mtId);

   /** 增加Gzh */
   Result<Gzh> addGzh(Gzh record);

   /** 更新Gzh */
   Result<Gzh> updateGzh(GzhVo record);

   /** 删除Gzh */
   Result<Gzh> deleteGzh(Gzh record);

   /** 公众号初始化数据 */
   PageInfo<GzhBody> selectAllGzh(Integer page, Integer size,  List typeName,Integer gzhAge,Double gzhSex,Integer gzhPrice,Integer fansType, Integer readNum,String cityOne,Byte status,String gzhName,String ghId,Integer gzhType,Integer sort,Double score) throws IOException;

   /**连表查询单个公众号发文情况*/
   Result<GzhBody> selectGzhBody(String ghId);

   Result<GzhBody> selectByPrimaryKey(String ghId);

   /** 公众号总数和总粉丝数*/
   Result<GzhCount> getGzhCount(@Param("mtId") String  mtId);
}
